@VeryStart:
EnableEvents()

OnTrade1(@Trade1)
OnTrade2(@Trade2)
SetVarNum(%Contact,0)




@Loopy:
GoToIfCountInInventoryGreater(@NoBanking,9,151)
GoTo(@banking)
@NoBanking:
Wait(20)
GoToIfCountInInventoryGreater(@NoBanking2,9,151)
GoTo(@banking)
@NoBanking2:
GoToIfVarEqualNum(@Loopy,%Contact,1)
SetVarPlayerByName(%ID,"sulaspaka")
GoToIfVarEqualNum(@Loopy,%ID,-1)
SetVarsPlayer(%ID,%x,%y,%lvl,%h)
SetVar(%xx1,%x)
SetVar(%yy1,%y)
SetVar(%xx2,%x)
SetVar(%yy2,%y)
AddVarNum(%xx1,3)
AddVarNum(%yy1,3)
AddVarNum(%xx2,-3)
AddVarNum(%yy2,-3)
GoToIfCoordsInVars(@OtherIsNear,%xx1,%yy1,%xx2,%yy2)
ActionVarVar(%x,%y)
@OtherIsNear:
TradePlayerVar(%ID)
GoTo(@Loopy)


@banking:
OnTimer(@VeryStart,1,1200)

@BankingTalk:
ResetQuestMenu()
ResetLastServerMessage()
SetVarsRandomNPCIn(%x,%y,%ID,106,515,98,510,95)
GoToIfVarEqualNum(@Loopy,%ID,-1)
ActionVarVar(%x,%y)
TalkToNPCVar(%ID)
WaitForQuestMenu(15)
GoToIfLastServerMessageIs(@BankingTalk,"Banker is busy at the moment")
GoToIfQuestMenu(@ContactWithBanker)
WaitForQuestMenu(15)
GoToIfLastServerMessageIs(@BankingTalk,"Banker is busy at the moment")
GoToIfQuestMenu(@ContactWithBanker)
WaitForQuestMenu(15)
GoToIfLastServerMessageIs(@BankingTalk,"Banker is busy at the moment")
GoToIfQuestMenu(@ContactWithBanker)
GoTo(@BankingTalk)

@ContactWithBanker:
Answer(0)
WaitForBankWindow(50)
Wait(5)
DepositEverything()
Wait(10)
@withdrawStuff:
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Withdraw(151,1)
Wait(10)
GoToIfLastServerMessageIsNot(@withdrawStuff,"You don't have room to hold that object!")
CloseBank()
Wait(10)
GoToIfInInventory(@banking,171)
GoTo(@Loopy)


Stop()


@Trade1:
SetVarNum(%Contact,1)
OnTimer(@LostContact,1,300)
Wait(20)
PutTrade(151,1,151,1,151,1,151,1,151,1,151,1,151,1,151,1,151,1,151,1)
Wait(10)
Accept1()
ERet()


@Trade2:
Wait(10)
Accept2()
Wait(30)
SetVarNum(%Contact,0)
ERet()

@LostContact:
SetVarNum(%Contact,0)
ERet()



